import request from '@/utils/request'

// 查询车间任务卡列表
export function listCard(query) {
  return request({
    url: '/system/card/list',
    method: 'get',
    params: query
  })
}

// 查询车间任务卡详细
export function getCard(id) {
  return request({
    url: '/system/card/' + id,
    method: 'get'
  })
}

// 新增车间任务卡
export function addCard(data) {
  return request({
    url: '/system/card',
    method: 'post',
    data: data
  })
}

// 修改车间任务卡
export function updateCard(data) {
  return request({
    url: '/system/card',
    method: 'put',
    data: data
  })
}

// 删除车间任务卡
export function delCard(id) {
  return request({
    url: '/system/card/' + id,
    method: 'delete'
  })
}

export function getWorkMsg(taskCardId) {
  return request({
    url: '/system/work/work/process/list',
    method: 'get',
    params: { taskCardId }
  })
}

export function getWorkIsFinish(taskId) {
  return request({
    url: '/system/card/work/is/finish',
    method: 'get',
    params: { taskId }
  })
}


